Method and system for real-time noise removal and image enhancement of high-dynamic range images

ABSTRACT

A method and system for real-time noise removal and image enhancement of high-dynamic range (HDR) images. The method includes receiving an HDR input image I and operating processing circuitry for (i) applying a first edge-preserving filter (e.g. guided filter) to the input image I, thereby generating a first image component B1 and a first set of linear coefficients āi,1; (ii) applying a second edge-preserving filter (e.g. guided filter) to the input image I, thereby generating a second image component B2 and a second set of linear coefficients āi,2; (iii) generating a plausibility mask P from a combination of the first set of linear coefficients āi,1 and the second set of linear coefficients āi,2, the plausibility mask P indicating spatial detail within the input image I; and (iv) generating an output image O based on first image component B1, the second image component B2 and the plausibility mask P.

TECHNICAL FIELD

The present invention relates to image processing, and more particularly to a method and system for real-time noise removal and image enhancement of high-dynamic range (HDR) images.

BACKGROUND ART

The present invention concerns the visualization of images captured in different spectral ranges, e.g., thermography images. Sensors for such imaging are commonly used in a wide range of applications such as: (1) night vision—pedestrian/animal detection in the automotive sector; (2) video surveillance; and (3) driver assistance systems using IR-based systems to handle the influence of external light sources, e.g., the sun. Other applications will be apparent to the skilled person.

It is often desired to display images captured with one dynamic range (e.g. HDR) on displays having a different (usually lower) dynamic range. A method for noise removal and image detail enhancement is typically needed that accounts for the limitations on display devices so as to effectively display HDR, e.g. infrared (IR) images. In this example, in order to represent real world scenes, IR images used to be represented by a HDR that generally exceeds the working range of common display devices (8 bits). Therefore, an effective HDR mapping without losing the perceptibility of details is needed.

There have been presented a vast number of image processing techniques to increase the image contrast, enhance image details and/or reduce the amount of noise. Although most of these techniques are intended for 8 bit still images, they can be adapted and/or combined to address the enhancement of IR image details whilst mapping its HDR into a proper range for display. Indeed, variations of gamma correction (GC) and histogram equalization (HE) approaches have been widely used to fit the raw data into an 8 bit data representation with an increase of the global contrast.

Recent IR image visualization approaches are strongly related to the enhancement of the details in the resulting 8 bit image representation. Glush et al. (S. W. Glushko and C. Salvaggio, “Quantitative analysis of infrared contrast enhancement algorithms,” in Infrared Imaging Systems: Design, Analysis, Modeling, and Testing, 2007, pp. 65 430S: 1-12) limited the noise amplification by the so-called unsharp masking, a technique that defines a detail map to classify noise and detail pixels depending on the intensity of the detail. As suggested by Durand and Dorsey (F. Durand and J. Dorsey, “Fast Bilateral Filtering for the Display of High-Dynamic-Range Images,” ACM Trans. Graph., vol. 21, no. 3, pp. 257-266, July 2002), bilateral filter (BF) has been widely used to define a detail map. Zuo et al. (C. Zuo, Q. Chen, N. Liu, J. Ren, and X. Sui, “Display and detail enhancement for high-dynamic-range infrared images,” Optical Engineering, vol. 50, no. 12, pp. 127 401:1-9, 2011) addressed the gradient reversal artefact on their BF-based Digital Detail Enhancement (BF&DDE) filter by applying a Gaussian low pass filter on the resulting base image component. More recently, He et al. (K. He, J. Sun, and X. Tang, “Guided Image Filtering,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 35, no. 6, pp. 1397-1409, June 2013) presented a new edge preserving filter, the so called guided filter (GF). As suggested by the authors, the GF might be also considered to define the detail map, instead of using the BF. Indeed, in contrast to the BF, GF does not suffer from the edge artefact and its processing time is significantly smaller.

A problem with known methods is how to achieve mapping of the HDR whilst preserving important image details for data representation in the 8 bits domain.

A further problem is how to identify/classify pixels representing image details and/or pixels that might present noise.

A further problem with known methods is how to achieve noise removal without attenuating or removing image details.

A further problem is how to avoid noise magnification in the detail enhancement process.

A further problem with known methods is how to enhance the global contrast of the IR image.

A further problem is how to avoid global brightness fluctuations from frame to frame (i.e., time consistency).

It is an object of the present invention to provide a system and method that address at least one of the foregoing problems and provide improved techniques for real-time noise removal and image enhancement of high-dynamic range (HDR) images.

SUMMARY

According to one aspect of the invention there is provided a method for real-time noise removal and image enhancement of high-dynamic range (HDR) images, the method comprising: receiving an input image I, the input image I comprising a HDR image; operating processing circuitry for applying a first edge-preserving filter to the input image I, thereby generating a first image component B₁ and a first set of linear coefficients ā_(i,1); applying a second edge-preserving filter to the input image I, thereby generating a second image component B₂ and a second set of linear coefficients ā_(i,2); generating a plausibility mask P from a combination of the first set of linear coefficients ā_(i,1) and the second set of linear coefficients ā_(i,2), the plausibility mask P indicating spatial detail within the input image I; and generating an output image O based on first image component B₁, the second image component B₂ and the plausibility mask P.

The first edge-preserving filter may comprise a detail preserving filter and the first image component B₁ may comprise the input image I in which image detail is preserved.

The second edge-preserving filter may comprise a noise removal filter and the second image component B₂ may comprise the input image I from which noise has been removed or reduced.

The first edge-preserving filter and/or the second edge-preserving filter may comprise a guided filter.

The plausibility mask P may be derived as

${{P\left( {i,j} \right)} = \frac{{P^{\prime}\left( {i,j} \right)} - P_{\min}^{\prime}}{P_{\max}^{\prime} - P_{\min}^{\prime}}},$ where P′=ā_(i,1)·ā_(i,2) and P′_(min) and P′_(max) the minimum and maximum values of P′, respectively.

The method may further comprise cropping P′ before stretching its values according to

${P\left( {i,j} \right)} = {\frac{{P^{\prime}\left( {i,j} \right)} - P_{\min}^{\prime}}{P_{\max}^{\prime} - P_{\min}^{\prime}}.}$

The cropping of P′ may comprise applying

${P^{\prime}\left( {i,j} \right)} = \left\{ {\begin{matrix} {{{\overset{\_}{a}}_{i,j}\left( {i,j} \right)} \cdot {{\overset{\_}{a}}_{i,2}\left( {i,j} \right)}} & {{{if}\mspace{14mu}{{{\overset{\_}{a}}_{i,1}\left( {i,j} \right)} \cdot {{\overset{\_}{a}}_{i,2}\left( {i,j} \right)}}} < \delta} \\ \delta & {otherwise} \end{matrix},} \right.$ where, in this embodiment, δ=μ+2σ, μ the mean of ā_(i,2) and σ=√{square root over (μ)}.

Generating an output image O may comprise generating an output image O based on the summation of the second image component B₂ and a detail image component D′ derived from the first image component B₁ and the plausibility mask P. The detail image component may be given as D′=λP·D, where D=B₁−B₂, and λ is a gain factor for adjusting the contrast of details in D.

The intermediate image O′ may be derived by O′=B₂+D′.

Generating an output image O comprises applying a mapping of an intermediate image O′ to output image O while preserving and enhancing the contrast of the image details in detail image component D′.

The mapping may comprise generating a histogram and a cumulative histogram of the grayscale value of each O′(i,j) within the intermediate image O′. The cumulative histogram might be characterized by three values, i.e., λ_(min), λ_(med), λ_(max) which defined the position and boundaries of the cumulative histogram of O′·α, with α being a contrast level. In this embodiment, we define λ_(min) at 1%, λ_(med) at 50%, and λ_(max) at 99% of the cumulative histogram.

The mapping may comprise classifying the grayscale value of each O′(i,j) within the intermediate image O′ as left O′_(L)(i,j) or right O′_(R)(i,j) depending on its location within the histogram of O′, such that O′ _(L)(i,j)=O′(i,j)·α if O′(i,j)·α<λ_(med) O′ _(R)(i,j)=O′(i,j)·α if O′(i,j)·α≥λ_(med) where λ_(med) corresponds to the location in the cumulative histogram of O′·α at, in this embodiment, 50%.

The mapping may comprise determining output image O from

${O\left( {i,j} \right)} = \left\{ \begin{matrix} 0 & {\begin{matrix} {{if}\mspace{14mu}\left( {{O_{L}^{\prime}\left( {i,j} \right)} \leq \lambda_{\min}} \right)\mspace{14mu}{and}} \\ \left( {{\lambda_{med} - \lambda_{\min}} > \beta} \right) \end{matrix}\mspace{14mu}} \\ \frac{\left( {{O_{L}^{\prime}\left( {i,j} \right)} - \lambda_{\min}} \right) \cdot \beta}{\lambda_{med} - \lambda_{\min}} & \begin{matrix} {{if}\mspace{14mu}\left( {{O_{L}^{\prime}\left( {i,j} \right)} > \lambda_{\min}} \right)\mspace{14mu}{and}} \\ \left( {{\lambda_{med} - \lambda_{\min}} > \beta} \right) \end{matrix} \\ {\max\left( {0,{O_{L}^{\prime} - \left( {\lambda_{med} - \beta} \right)}} \right)} & {{if}\mspace{14mu}\left( {{\lambda_{med} - \lambda_{\min}} \leq \beta} \right)} \\ \left( {2^{N} - 1} \right) & \begin{matrix} {{if}\mspace{14mu}\left( {{O_{R}^{\prime}\left( {i,j} \right)} > \lambda_{\max}} \right)\mspace{14mu}{and}} \\ \left( {{\lambda_{\max} - \lambda_{med}} > {\left( {2^{N} - 1} \right) - \beta}} \right) \end{matrix} \\ {\frac{\begin{matrix} {\left( {{O_{R}^{\prime}\left( {i,j} \right)} - \lambda_{med}} \right) \cdot} \\ \left( {\left( {2^{N} - 1} \right) - \beta} \right) \end{matrix}}{\lambda_{\max} - \lambda_{med}} + \beta} & \begin{matrix} {{if}\mspace{14mu}\left( {{O_{R}^{\prime}\left( {i,j} \right)} \leq \lambda_{\max}} \right)\mspace{14mu}{and}} \\ \left( {{\lambda_{\max} - \lambda_{med}} > {\left( {2^{N} - 1} \right) - \beta}} \right) \end{matrix} \\ {\min\left( {\left( {2^{N} - 1} \right),{O_{R}^{\prime} - \left( {\lambda_{med} - \beta} \right)}} \right)} & {{if}\mspace{14mu}\left( {{\lambda_{\max} - \lambda_{med}} \leq {\left( {2^{N} - 1} \right) - \beta}} \right)} \end{matrix} \right.$ where λ_(min) and λ_(max) correspond to the boundaries of the cumulative histogram of O′·α, and N is the number of bits defining the dynamic range of output image O.

In one embodiment, N=8 for 8 bit data representation within the range [0, 255].

The intermediate image O′ may be a 12-bit or 14-bit image.

In one embodiment, for the first image component B₁ and the second image component B₂, each is derived using a linear transform of I in a window w_(k) centered at pixel k, such that B _(i)= a _(l) I _(i)+ b _(v) , ∀iϵw _(k),

-   -   where

${\overset{\_}{a_{\iota}} = {\frac{1}{w}{\sum\limits_{k \in w_{i}}a_{k}}}},{{{with}\mspace{14mu} a_{k}} = \frac{\sigma_{k}^{2}}{\sigma_{k}^{2} + ɛ}},{\overset{\_}{b_{\iota}} = {\frac{1}{w}{\sum\limits_{k \in w_{i}}b_{k}}}},{{{with}\mspace{14mu} b_{k}} = {\left( {1 - a_{k}} \right)\mu_{k}}},$

-   -   are linear coefficients assumed to be constant in w_(k),     -   μ_(k) and σ_(k) ² are the mean and variance of I in w_(k),     -   |w| is the number of pixels in w_(k), and     -   ε is a regularization parameter penalizing large a_(k).

In one embodiment, the size of w_(k) is 3×3, ε₁=25 and/or ε₂=2500.

According to another aspect of the invention there is provided a programmable image processing system when suitably programmed for carrying out the method of any of the preceding claims, the system comprising circuitry for receiving or storing an input image I and processing circuitry for performing the method.

According to another aspect of the invention there is provided a system for real-time noise removal and image enhancement of high-dynamic range (HDR) images, the system comprising: circuitry for receiving or storing an input image I, the input image I comprising a HDR image; and processing circuitry, coupled to the circuitry for receiving or storing an input image I, the processing circuitry being operable for applying a first edge-preserving filter to the input image I, thereby generating a first image component B₁ and a first set of linear coefficients ā_(i,1); applying a second edge-preserving filter to the input image I, thereby generating a second image component B₂ and a second set of linear coefficients ā_(i,2); generating a plausibility mask P from a combination of the first set of linear coefficients ā_(i,1) and the second set of linear coefficients ā_(i,2), the plausibility mask P indicating spatial detail within the input image I; and generating an output image O based on first image component B₁, the second image component B₂ and the plausibility mask P.

According to another aspect of the invention there is provided a recordable, rewritable or storable medium having recorded or stored thereon data defining or transformable into instructions for execution by processing circuitry and corresponding to at least the steps of any of claims 1 to 18 of the appended claims.

According to another aspect of the invention there is provided a server computer incorporating a communications device and a memory device and being adapted for transmission on demand or otherwise of data defining or transformable into instructions for execution by processing circuitry and corresponding to at least the steps of any of claims 1 to 18 of the appended claims.

In certain embodiments, two edge-preserving filters, e.g., the Bilateral Filter (BF) or the Guided Filter (GF), are combined to first generate accurate base and detail image components, and then a plausibility mask—to be used as an indicator of the spatial detail. The latter enables identification of those regions that are prominent to present noise in the detail image component. Finally, the working range of the HDR is filtered along time, to avoid global brightness fluctuations in the final 8 bit data representation, which results from combining both detail and base image components using a dedicated histogram projection method. This histogram projection method is, for example, adapted to requirements in the automotive sector.

An advantage of the invention is that in at least some embodiments it provides mapping of the HDR whilst preserving important image details for data representation in 8 bit domain.

A further advantage is that the base image component B2 that represents the HDR is mapped, whereas image details from the enhanced D′ image are enhanced/preserved.

A further advantage is that the techniques enable individual processing of HDR mapping and detail enhancement.

A further advantage is that identification/classification of pixels representing image details and/or pixels that might present noise is facilitated.

A further advantage is that noise removal without attenuating or removing image details is facilitated.

A further advantage is that the formulation of P ensures that only noise (low weighted pixels in P) will be removed.

A further advantage is to avoid noise magnification in the detail enhancement process.

A further advantage is that, as noisy pixels are low weighted in P, they will not be magnified after applying the gain factor.

A further advantage is to enhance the global contrast of an IR image.

A further advantage is that, through the use of a novel histogram projection approach, in addition to effectively mapping the HDR to the 8 bit domain, it allows the user to adjust both contrast and brightness levels without generating undesired artifacts such as noise or image distortion.

A further advantage is to avoid global brightness fluctuations from frame to frame (time consistency).

A further advantage is that the maximum and minimum values to which the resulting 8 bit image is mapped are computed from a temporal statistical stabilization. By doing so global brightness fluctuations between frames is avoided.

BRIEF DESCRIPTION OF THE DRAWINGS

Preferred embodiments of the invention will now be described, by way of example, with reference to the accompanying drawings, in which:

FIG. 1 shows a flow diagram of the method for real-time noise removal and image enhancement (TDDE filter) according to the embodiments of the invention;

FIG. 2 illustrates (a) a raw input image I, (b) a first image component B₁ generated by guided filter GF₁ in the method of FIG. 1, and (c) a second image component B₂ generated by guided filter GF₂ in the method of FIG. 1;

FIG. 3 shows (a) the first linear coefficients ā_(i,1) resulting from GF₁ on the input image I from FIG. 2(a), (b) the histogram for ā_(i,1), (c) the second linear coefficients ā_(i,2) resulting from GF₂ on the input image I from FIG. 2(a), (d) the histogram for ā_(i,2), (e) plausibility mask P in the method of FIG. 1, and (f) the histogram for P;

FIG. 4 shows detail image component (a) D of FIG. 1 resulting from the difference between B₁ and B₂ in FIG. 2, and (b) the resulting D′ of FIG. 1 after noise masking and detail magnification; and

FIGS. 5 to 9 illustrate the disclosed histogram projection method for different test cases using real scenes.

DESCRIPTION OF PREFERRED EMBODIMENTS

As used herein, the “images” or “image signals” may be analog or digital, and may be subject to conventional analog or digital filtering.

Where references are made herein to steps, operations or manipulations involving “images”, etc., these are implemented, where appropriate, by means of operations upon electronically processable representations (e.g. captured stills of video frame signals, bitstream video data, MPEG files or video streams, PC-video, or any other capturable or viewable image data format) of such “images”.

Where references are made herein to steps, operations or manipulations involving “images”, “image signals” or “image data”, these may be implemented, where appropriate, by means of software controlled processor operations, hardware circuitry or any suitable combination of these.

While the implementation described herein is suitably embodied in a computer system, it may be incorporated in an adaptor, an image processor, or any other equipment located between or incorporating an image source and a display device (e.g. LCD, Plasma, projector, etc.), or in the display device itself. The computer system suitably comprises a processor coupled (where appropriate via DACs and ADCs, or other interfaces) to RAM, ROM, storage devices, image capture and/or image storage devices, display driver and display devices, data communication and other peripherals, as is well known to persons skilled in the art; therefore, these will not be illustrated or discussed further.

FIG. 1 shows a flow diagram of the method for real-time noise removal and image enhancement (TDDE filter) according to an embodiment of the invention. An input image I is fed to both a detail enhancement guided filter GF₁ and a noise removal guided filter GF₂. Resulting from detail enhancement guided filter GF₁ is a first image component B₁ and first linear coefficients ā_(i,1). Resulting from noise removal guided filter GF₂ is a second image component B₂ and second linear coefficients ā_(i,2). The first linear coefficients ā_(i,1) and second linear coefficients ā_(i,2) are combined to form plausibility mask P, as discussed in further detail below. As also discussed in further detail below subtraction element 2 generates D=B₁−B₂, multiplication element 4 generates D′=λP·D, summing element 6 generates O′=B₂+D′, and mapping element 8 generates the final output image O by mapping O′ to O, the latter being an 8-bit image.

In order to address the abovementioned problems, the present invention, at least in some embodiments, involves the use of a so-called Temporal DDE (TDDE) filter. In general, known DDE-based filters rely on a single edge-preserving filter, e.g., BF or GF, to separate the B image component, which contains the HDR to be effectively mapped, from the D image component that presents tiny variations corresponding to fine image details to be preserved and enhanced in the resulting 8 bit image representation. The TDDE filter according to one or more embodiments of the invention includes the GF in its design as the GF presents a better behavior near edges than the BF, with a major advantage of being a fast and non-approximate linear time algorithm, regardless of the kernel size and the intensity range. The latter enables real-time performance. In addition, the GF does not suffer from the gradient reversal artefacts, as with the BF. The TDDE filter according to one or more embodiments of the invention relies not only on a single but on two dedicated GFs when computing both B and D image components.

With regard to the GF, to assist understanding of the way in which each GF, i.e., GF₁ and GF₂, is parameterized, to respectively preserve details (B₁) and remove noise (B₂), these will be discussed briefly. In general, the B image component corresponds to the edge-preserving smoothed image that results from the GF, a linear transform of I in a window w_(k) centered at pixel k, i.e.,

$\begin{matrix} {{B_{i} = {{\overset{\_}{a_{\iota}}I_{i}} + \overset{\_}{b_{\iota}}}},{\forall{i\;\epsilon\; w_{k}}},} & (1) \\ {where} & \; \\ {{\overset{\_}{a_{\iota}} = {\frac{1}{w}{\sum\limits_{k \in w_{i}}a_{k}}}},{{{with}\mspace{14mu} a_{k}} = \frac{\sigma_{k}^{2}}{\sigma_{k}^{2} + ɛ}},} & (2) \\ {{\overset{\_}{b_{\iota}} = {\frac{1}{w}{\sum\limits_{k \in w_{i}}b_{k}}}},{{{with}\mspace{14mu} b_{k}} = {\left( {1 - a_{k}} \right)\mu_{k}}},} & (3) \end{matrix}$ are linear coefficients assumed to be constant in w_(k),

-   μ_(k) and σ_(k) ² are the mean and variance of I in w_(k), -   |w| is the number of pixels in w_(k), and -   ε is a regularization parameter penalizing large a_(k).

The selection of the w_(k) size may be done depending on the minimum size of the details to be preserved in I. A small w_(k) size may be chosen, e.g., 3×3, in order to preserve and enhance fine image details such as trees' leaves. The smoothing level is given by the ε parameter. That is, if ε is set too small, not only image details are preserved but also noise and tiny structures in the image. Contrarily, if ε is set too large, noise will be totally removed together with all image details.

Therefore, GF₁ is configured with a very small ε₁ value, e.g., ε₁=25, from which results a B₁ image component slightly smoother than I, containing the image details to be present in the final 8 bit representation. On the other hand, GF₂ is configured with an ε₂ value large enough to totally remove the noise, e.g., ε₂=2500, from which the base image component B₂ is obtained. Inevitably, noise will be present in B₁, whereas image details will be totally removed in B₂.

FIG. 2 illustrates (a) a raw input image I, (b) a first image component B₁ generated by guided filter GF₁ in the method of FIG. 1, and (c) a second image component B₂ generated by guided filter GF₂ in the method of FIG. 1. FIG. 2(a) presents the selected input image I to illustrate the behavior of the GF when configured with ε₁ or ε₂. Regarding the w_(k) size, it is noted that it may be small enough, e.g., k=3, in order to preserve small image details such as trees' leaves. Preferably, w_(k) size is the same in both GF₁ and GF₂ in order to avoid non desired artefacts when computing the plausibility mask P (FIG. 1).

FIG. 3 shows (a) the first linear coefficients ā_(i,1) resulting from GF₁ on the input image I from FIG. 2(a), (b) the histogram for ā_(i,1) (c) the second linear coefficients ā_(i,2) resulting from GF₂ on the input image I from FIG. 2(a), (d) the histogram for ā_(i,2), (e) plausibility mask P in the method of FIG. 1, and (f) the histogram for P.

In order to exploit the advantages of each GF while avoiding their individual drawbacks, a new plausibility mask P is used that combines the linear coefficients ā_(i,1) and ā_(i,2) that result from each GF₁ and GF₂, respectively. The aim of P is to weight image details as in ā_(i,1) (see FIG. 3(a)), in contrast to weighting noisy pixels as in ā_(i,2) (see FIG. 3(c)). To do so, P is defined as

$\begin{matrix} {{{P\left( {i,j} \right)} = \frac{{P^{\prime}\left( {i,j} \right)} - P_{\min}^{\prime}}{P_{\max}^{\prime} - P_{\min}^{\prime}}},} & (4) \end{matrix}$ where P′=ā_(i,1)·ā_(i,2) and P′_(min) and P′_(max) are the minimum and maximum weight values of P′, respectively. It is noted that the product of ā_(i,1) and ā_(i,2) will globally reduce the weights along edges, and thus it may significantly reduce or even remove image details in the final 8 bit image. To avoid that, P′ is preferably cropped before stretching its values in (4), i.e.,

$\begin{matrix} {{P^{\prime}\left( {i,j} \right)} = \left\{ {\begin{matrix} {{{\overset{\_}{a}}_{i,j}\left( {i,j} \right)} \cdot {{\overset{\_}{a}}_{i,2}\left( {i,j} \right)}} & {{{if}\mspace{14mu}{{{\overset{\_}{a}}_{i,1}\left( {i,j} \right)} \cdot {{\overset{\_}{a}}_{i,2}\left( {i,j} \right)}}} < \delta} \\ \delta & {otherwise} \end{matrix},} \right.} & (5) \end{matrix}$ where δ=μ+2σ, μ is the mean of ā_(i,2) and σ=√{square root over (μ)}, as the noise in ā_(i,2) follows a Poisson distribution (see FIG. 3(d)).

FIG. 4 shows detail image component (a) D of FIG. 1 resulting from the difference between B₁ and B₂ in FIG. 2, and (b) the resulting D′ of FIG. 1 after noise masking and detail magnification.

The TDDE filter according to one or more embodiments of the invention does not consider the input image I when computing the D image component, but rather the B₁ image component that results from GF₁, i.e., a slightly smoother version of I that preserves all image details with a slight reduction of noise, i.e., D=B₁−B₂. However, this straightforward computation of D not only retains tiny details but also the noise in B₁, as illustrated in FIG. 4(a). According to human perception characteristics, noise within smooth image regions can be easily perceived by the observer as spuriousness or texture, whereas it is almost imperceptible along sharp edges. Taking that into account, the noise is masked depending on the spatial detail, i.e., using the plausibility mask P. Indeed, P clearly reflects the spatial detail of the input image I, enabling differentiation of those regions presenting image details in B₁ from those regions that are prominent to contain noise. According to embodiments, the detail image component D′ is defined as D′=λP·D  (7) where λ is a gain factor to increase, if desired, the contrast of the details in D. FIG. 4(b) presents the resulting D′ image component after being masked by P.

The final 8 bit enhanced image O results from mapping the sum of the generated B₂ image component and the enhanced D′ image component, i.e., O=└B₂ D′┘, to the 8 bit domain (in mapping element 8 in FIG. 1). The operator └⋅┘ denotes the mapping to the 8 bit domain. To do the mapping, either extended Histogram Equalization (HE) or Automatic Gain Control (AGC) based techniques are commonly used in known systems. However, whereas AGC-based approaches just remove extreme values and linearly map the HDR onto the 8 bit domain, HE-based approaches simply increase the contrast in the dominating temperature range. That is, more dynamic range is provided to the dominating temperature range and less dynamic range to image regions in the non-dominating temperature range. However, a problem occurs if the image details to be preserved/enhanced are not in that dominating range. Another issue occurs when mapping HDR images with an active data range smaller than the display range. In the case of images from an IR camera, this is a situation that occurs when the IR camera is facing a uniform background or the cloudless sky. In such cases, the resulting mapped image will be distorted and full of noise due to the linear extension of the narrow active range.

In order to overcome the aforementioned drawbacks, alternative known DDE-based filters first map the HDR of the B₂ image component to the 8 bit domain and then generate the final O image by adding D′, i.e., O=└B₂┘+D′. However, a problem is that the direct combination of the mapped └B₂┘ and D′ yields to saturation in most of the cases, as pixel values of D′ are considerable if compared to the 8 bit data range representation (see the data range representation in FIG. 4).

To address the aforementioned issues, in accordance with one or more embodiments of the invention a new histogram projection approach is used to effectively map the dynamic of O′=B₂+D′ (usually represented by 12 or 14 bits) into the 8 bit domain, while preserving and enhancing the contrast of the image details in D′, regardless of the length of the B₂ active data range as well as the number of pixels that happen to be in. More particularly, first, the grayscale value of each O′(i,j) are classified as left O′_(L)(i,j) or right O′_(R)(i,j) (or cold and warm) depending on its location within the histogram of O′, i.e., O′ _(L)(i,j)=O′(i,j)·α if O′(i,j)·α<λ_(med)  (8) O′ _(R)(i,j)=O′(i,j)·α if O′(i,j)·α≥λ_(med)  (9) with λ_(med) corresponding to the location of the cumulative histogram of O′·α at, in this embodiment, 50% and α being the contrast level, a parameter through which the operator can adjust how wide a range of temperature will be mapped into the gray scale of the display device. A low contrast level defines a wide temperature span (HDR) in which low contrast variations are not visible. In contrast, a high contrast level defines a narrow temperature span (LDR) in which low contrast variations become visible.

A second parameter to be used is β, the brightness level from which the user can adjust the center temperature of the display device. A low brightness level defines a colder scene in which only hot targets are displayed at full scale, i.e., in white hot. In contrast, a high brightness level defines a warmer scene with only cold targets displayed as black.

The final 8 bit enhanced image O results from

$\begin{matrix} {{O\left( {i,j} \right)} = \left\{ \begin{matrix} 0 & {\begin{matrix} {{if}\mspace{14mu}\left( {{O_{L}^{\prime}\left( {i,j} \right)} \leq \lambda_{\min}} \right)\mspace{14mu}{and}} \\ \left( {{\lambda_{med} - \lambda_{\min}} > \beta} \right) \end{matrix}\mspace{14mu}} \\ \frac{\left( {{O_{L}^{\prime}\left( {i,j} \right)} - \lambda_{\min}} \right) \cdot \beta}{\lambda_{med} - \lambda_{\min}} & \begin{matrix} {{if}\mspace{14mu}\left( {{O_{L}^{\prime}\left( {i,j} \right)} > \lambda_{\min}} \right)\mspace{14mu}{and}} \\ \left( {{\lambda_{med} - \lambda_{\min}} > \beta} \right) \end{matrix} \\ {\max\left( {0,{O_{L}^{\prime} - \left( {\lambda_{med} - \beta} \right)}} \right)} & {{if}\mspace{14mu}\left( {{\lambda_{med} - \lambda_{\min}} \leq \beta} \right)} \\ \left( {2^{N} - 1} \right) & \begin{matrix} {{if}\mspace{14mu}\left( {{O_{R}^{\prime}\left( {i,j} \right)} > \lambda_{\max}} \right)\mspace{14mu}{and}} \\ \left( {{\lambda_{\max} - \lambda_{med}} > {\left( {2^{N} - 1} \right) - \beta}} \right) \end{matrix} \\ {\frac{\begin{matrix} {\left( {{O_{R}^{\prime}\left( {i,j} \right)} - \lambda_{med}} \right) \cdot} \\ \left( {\left( {2^{N} - 1} \right) - \beta} \right) \end{matrix}}{\lambda_{\max} - \lambda_{med}} + \beta} & \begin{matrix} {{if}\mspace{14mu}\left( {{O_{R}^{\prime}\left( {i,j} \right)} \leq \lambda_{\max}} \right)\mspace{14mu}{and}} \\ \left( {{\lambda_{\max} - \lambda_{med}} > {\left( {2^{N} - 1} \right) - \beta}} \right) \end{matrix} \\ {\min\left( {\left( {2^{N} - 1} \right),{O_{R}^{\prime} - \left( {\lambda_{med} - \beta} \right)}} \right)} & {{if}\mspace{14mu}\left( {{\lambda_{\max} - \lambda_{med}} \leq {\left( {2^{N} - 1} \right) - \beta}} \right)} \end{matrix} \right.} & (8) \end{matrix}$ where λ_(min) and λ_(max) corresponding to boundaries of the cumulative histogram of O′·α. In this embodiment, N=8 for 8 bit data representation within the range [0, 255].

FIGS. 5 to 9 illustrate the disclosed histogram projection method using real scenes acquired by a prototype IR thermal camera that provides HDR IR images of (384_288) pixels. All reported results have been obtained using an Intel® Core™ i5-4200U CPU @ 1.60 GHz with an integrated graphic card Intel® HD Graphics 4400.

FIG. 5 shows the two real test cases that have been considered to evaluate the proposed approach. FIG. 5a is an extreme test case (Test 1) with a very narrow temperature span containing a very small target (human) on the bottom-right of the image. Conversely, the test case (Test 2) in FIG. 5c presents a scene with high temperature dynamics that must be effectively mapped into the 8 bit domain. The disclosed enhanced TDDE filter has been considered to illustrate the behavior of the proposed histogram projection mapping method. The following parameters have been used: k=3, ε₁=25, ε₂=2500, and λ=5.

FIG. 6 and FIG. 7 illustrate the behavior of the proposed HDR mapping method on the narrow temperature span of Test 1 depending on the contrast α and brightness β parameters adjusted by the operator. From the figures we observe how the histogram is centered according to the center temperature defined by β. By adjusting α, the operator can make discernible very small temperatures in the scene (see FIG. 7a ). The behavior of the proposed mapping method on the wide temperature span of Test 2 is shown in FIG. 8 and FIG. 9. In this case, intensity values from O′_(L) and/or O′_(R) that lie outside of (λ_(med)−λ_(min)>β and/or (λ_(max)−λ_(med)>(2^(N)−1)−β), respectively, are linearly stretched along the entire 8 bit range.

While the use of the Guided Filter (GF) to split the input raw image is described herein, any other edge-preserving and noise-reducing smoothing filter for images might be used, such as the Bilateral Filter (BF).

While the use of the Histogram Projection method for 16 bits to 8 bits data conversion is described herein, alternative histogram equalization-based approaches might be used.

While the use of plural edge-preserving filters is described herein, in alternative embodiments a single GF or BF can be used to compute base and detail image components, as well as the plausibility mask. However, a trade-off (manually tuned) might be chosen between detail and noise removal.

While embodiments have been described by reference to embodiments having various components in their respective implementations, it will be appreciated that other embodiments make use of other combinations and permutations of these and other components.

Furthermore, some of the embodiments are described herein as a method or combination of elements of a method that can be implemented by a processor of a computer system or by other means of carrying out the function. Thus, a processor with the necessary instructions for carrying out such a method or element of a method forms a means for carrying out the method or element of a method. Furthermore, an element described herein of an apparatus embodiment is an example of a means for carrying out the function performed by the element for the purpose of carrying out the invention.

In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In other instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.

Thus, while there has been described what are believed to be the preferred embodiments of the invention, those skilled in the art will recognize that other and further modifications may be made thereto without departing from the scope of the invention, and it is intended to claim all such changes and modifications as fall within the scope of the invention. For example, any formulas given above are merely representative of procedures that may be used. Functionality may be added or deleted from the block diagrams and operations may be interchanged among functional blocks. Steps may be added or deleted to methods described within the scope of the present invention. 

The invention claimed is:
 1. A method for real-time noise removal and image enhancement of high-dynamic range HDR images, the method comprising: receiving an input image I, the input image I comprising a HDR image; operating processing circuitry for applying a first edge-preserving filter to the input image I, thereby generating a first image component B₁ and a first set of linear coefficients ā_(i,1); said method is characterized by: applying a second edge-preserving filter to the input image I, thereby generating a second image component B₂ and a second set of linear coefficients ā_(i,2), wherein the first edge-preserving filter and the second edge-preserving filter are distinct filters having different filtering characteristics such that the first image component B₁ is different than the second image component B₂, and the first set of linear coefficients ā_(i,1)is different than the second set of linear coefficients ā_(i,2); generating a plausibility mask P from a combination of the first set of linear coefficients ā_(i,1)and the second set of linear coefficients ā_(i,2), wherein the plausibility mask is derived as: P(i,j)=P′(i,j)−P′ _(min) where P′ =ā_(i,1)· ā_(i,2)and P′_(min)and P′_(max) the minimum and maximum weight values of P′, respectively; and generating an output image O based on first image component B₁, the second image component B₂ and the plausibility mask P.
 2. The method of claim 1, wherein the first edge-preserving filter comprises a detail preserving filter and the first image component B₁ comprises the input image I in which image detail is preserved.
 3. The method of claim 1, wherein the second edge-preserving filter comprises a noise removal filter and the second image component B₂ comprises the input image I from which noise has been removed or reduced.
 4. The method of claim 1, wherein the first edge-preserving filter and/or the second edge-preserving filter comprises a guided filter.
 5. The method of claim 1, further comprising cropping P′ before stretching its values according to ${P\left( {i,j} \right)} = {\frac{{P^{\prime}\left( {i,j} \right)} - P_{\min}^{\prime}}{P_{\max}^{\prime} - P_{\min}^{\prime}}.}$
 6. The method of claim 1, further comprising cropping P′ according to ${P^{\prime}\left( {i,j} \right)} = \left\{ {\begin{matrix} {{{\overset{\_}{a}}_{i,j}\left( {i,j} \right)} \cdot {{\overset{\_}{a}}_{i,2}\left( {i,j} \right)}} & {{{if}\mspace{14mu}{{{\overset{\_}{a}}_{i,1}\left( {i,j} \right)} \cdot {{\overset{\_}{a}}_{i,2}\left( {i,j} \right)}}} < \delta} \\ \delta & {otherwise} \end{matrix}.} \right.$ where δ=μ+2σ, μ the mean of ā_(i,2)and σ=√{square root over (μ)}.
 7. The method of claim 1, wherein generating an output image O comprises generating an output image O based on the summation of the second image component B₂ and a detail image component D′ derived from the first image component B₁ and the plausibility mask P.
 8. The method of claim 7, wherein the detail image component D′=λP·D, where D=B₁ −B₂, and λ is a gain factor for adjusting the contrast of details in D.
 9. The method of claim 7, wherein generating an output image O further comprises applying an intermediate image O′derived by O′=B ₂ +D′.
 10. The method of claim 1, wherein generating an output image O further comprises applying a mapping of an intermediate image O′ to output image O while preserving and enhancing the contrast of the image details in a detail image component D′.
 11. The method of claim 10, wherein the mapping comprises generating a histogram of the grayscale value of each O′ (i,j) within the intermediate image O′.
 12. The method of claim 10, wherein the mapping comprises classifying the grayscale value of each O′(i, j) within the intermediate image O′ as left O′_(L)(i,j) or right O′_(R)(i, j) depending on its location within the histogram of O′, such that O′ _(L)(i,j)=O′(i,j)·αifO′(i,j)·α<λ_(med) O′ _(R)(i,j)=O′(i,j)·αifO′(i,j)·α≥λ_(med) where λ_(med) corresponds to the location in the cumulative histogram of O′·α at 50% and a is a contrast level.
 13. The method of claim 10, wherein the mapping comprises determining output image O from ${O\left( {i,j} \right)} = \left\{ \begin{matrix} 0 & {\begin{matrix} {{if}\mspace{14mu}\left( {{O_{L}^{\prime}\left( {i,j} \right)} \leq \lambda_{\min}} \right)\mspace{14mu}{and}} \\ \left( {{\lambda_{med} - \lambda_{\min}} > \beta} \right) \end{matrix}\mspace{14mu}} \\ \frac{\left( {{O_{L}^{\prime}\left( {i,j} \right)} - \lambda_{\min}} \right) \cdot \beta}{\lambda_{med} - \lambda_{\min}} & \begin{matrix} {{if}\mspace{14mu}\left( {{O_{L}^{\prime}\left( {i,j} \right)} > \lambda_{\min}} \right)\mspace{14mu}{and}} \\ \left( {{\lambda_{med} - \lambda_{\min}} > \beta} \right) \end{matrix} \\ {\max\left( {0,{O_{L}^{\prime} - \left( {\lambda_{med} - \beta} \right)}} \right)} & {{if}\mspace{14mu}\left( {{\lambda_{med} - \lambda_{\min}} \leq \beta} \right)} \\ \left( {2^{N} - 1} \right) & \begin{matrix} {{if}\mspace{14mu}\left( {{O_{R}^{\prime}\left( {i,j} \right)} > \lambda_{\max}} \right)\mspace{14mu}{and}} \\ \left( {{\lambda_{\max} - \lambda_{med}} > {\left( {2^{N} - 1} \right) - \beta}} \right) \end{matrix} \\ {\frac{\begin{matrix} {\left( {{O_{R}^{\prime}\left( {i,j} \right)} - \lambda_{med}} \right) \cdot} \\ \left( {\left( {2^{N} - 1} \right) - \beta} \right) \end{matrix}}{\lambda_{\max} - \lambda_{med}} + \beta} & \begin{matrix} {{if}\mspace{14mu}\left( {{O_{R}^{\prime}\left( {i,j} \right)} \leq \lambda_{\max}} \right)\mspace{14mu}{and}} \\ \left( {{\lambda_{\max} - \lambda_{med}} > {\left( {2^{N} - 1} \right) - \beta}} \right) \end{matrix} \\ {\min\left( {\left( {2^{N} - 1} \right),{O_{R}^{\prime} - \left( {\lambda_{med} - \beta} \right)}} \right)} & {{if}\mspace{14mu}\left( {{\lambda_{\max} - \lambda_{med}} \leq {\left( {2^{N} - 1} \right) - \beta}} \right)} \end{matrix} \right.$ where λ_(min) and λ_(max) correspond to the boundaries of the cumulative histogram of O′·α, and N is the number of bits defining the dynamic range of output image O.
 14. The method of claim 13, wherein N=8 for 8 bit data representation within the range [0, 255].
 15. The method of claim 9, wherein the intermediate image O′ is a 12-bit or 14-bit image.
 16. The method of claim 1, wherein for the first image component B₁ and the second image component B₂, each is derived using a linear transform of I in a window w_(k) centered at pixel k, such that B _(i) =ā _(l) I _(i) +b _(v) ∀iϵw _(k), where ${\overset{\_}{a_{\iota}} = {\frac{1}{w}{\sum\limits_{k \in w_{i}}a_{k}}}},{{{with}\mspace{14mu} a_{k}} = \frac{\sigma_{k}^{2}}{\sigma_{k}^{2} + ɛ}},{\overset{\_}{b_{\iota}} = {\frac{1}{w}{\sum\limits_{k \in w_{i}}b_{k}}}},{{{with}\mspace{14mu} b_{k}} = {\left( {1 - a_{k}} \right)\mu_{k}}},$ are linear coefficients assumed to be constant in w_(k), μ_(k) and σk² are the mean and variance of I in w_(k), |w| is the number of pixels in w_(k), and ε is a regularization parameter penalizing large α_(k).
 17. The method of claim 16, wherein the size of w_(k) is 3×3, ε₁ =25 and/or ε₂=2500.
 18. A programmable image processing system when suitably programmed for carrying out the method of claim 1, the system comprising circuitry for receiving or storing an input image I and processing circuitry for performing the method.
 19. A system for real-time noise removal and image enhancement of high-dynamic range HDR images, the system comprising: circuitry for receiving or storing an input image I, the input image I comprising a HDR image; processing circuitry, coupled to the circuitry for receiving or storing an input image I, the processing circuitry being operable for applying a first edge-preserving filter to the input image I, thereby generating a first image component B₁ and a first set of linear coefficients ā_(i,1); applying a second edge-preserving filter to the input image I, thereby generating a second image component B₂ and a second set of linear coefficients ā_(i,2), wherein the first edge-preserving filter and the second edge-preserving filter are distinct filters having different filtering characteristics such that the first image component B₁ is different than the second image component B₂, and the first set of linear coefficients ā_(i,1)is different than the second set of linear coefficients ā_(i,2); generating a plausibility mask P from a combination of the first set of linear coefficients ā_(i,1)and the second set of linear coefficients ā_(i,2), wherein the plausibility mask is derived as: P(i,j)=P′(i,j)−P′ _(min) where P′ =ā_(i,1)· ā_(i,2)and P′_(min)and P′_(max) the minimum and maximum weight values of P′, respectively; and generating an output image O based on first image component B₁, the second image component B₂ and the plausibility mask P.
 20. A non-transitory computer-readable medium having recorded or stored thereon data defining or transformable into instructions for execution by processing circuitry and corresponding to at least the steps of claim
 1. 21. A server computer incorporating a communications device and a memory device and being adapted for transmission on demand or otherwise of data defining or transformable into instructions for execution by processing circuitry and corresponding to at least the steps of claim
 1. 